home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / tchk21ex.zip / DEMOPOP.C < prev    next >
C/C++ Source or Header  |  1989-06-06  |  1KB  |  37 lines

  1. /* TCHK 2.1 - Howard Kapustein's Turbo C library        6-6-89      */
  2. /* Copyright (C) 1988,1989 Howard Kapustein.  All rights reserved.  */
  3.  
  4. /* demopop.c  - used for testing TCHK popup menus */
  5.  
  6. #include <menuhk.h>
  7. #include <video.h>
  8. #include <color.h>
  9. #include <howard.h>
  10. #include <stdio.h>
  11. #include <string.h>
  12.  
  13. void main()
  14. {
  15.     extern int _argc, popuperrno;
  16.     char *cmd[]={""," Protocol",""," Xmodem"," Ymodem"," Zmodem"," Disabled"," Other",""};
  17.     char cmdflag[] = { STATICTEXT,STATICTEXT,STATICTEXT,ENABLED,ENABLED,ENABLED,DISABLED,ENABLED,STATICTEXT };
  18.     char fr[] = {'╔','═','╗','║','╝','═','╚','║','\0','╣','╠'};
  19.     int k, cmdkey[] = { -1,-1,-1, 1,1,1, -1, -1, -1};
  20.     struct popup_header *ph;
  21.  
  22.     ph = popup_alloc(8,4,25,14,fr,"Upload",CENTER,cmd,cmdkey,cmdflag,
  23.                    LWHITE|B_BLUE, LRED, YELLOW, LRED, LBLUE|B_WHITE, CYAN,
  24.                    BLACK|B_CYAN, LGREEN, 1,
  25.                    CASEINDEP|ERASEMENU|DISABLENOHILITE|WRAPAROUND|ESCQUIT);
  26.     if (ph == NULL)
  27.         printf("ph == NULL  (popuperrno = %d)\n",popuperrno);
  28.     else {
  29.         do {
  30.             k = popup_get(ph);
  31.             gotohv(60,22);
  32.             printf("k = %2d",k);
  33.         } while (k != 0);
  34.         popup_free(ph);
  35.     }
  36. }
  37.